package jsimus;

import java.io.IOException;
import java.net.*;


public class Listener {
	   private static int port=4000;

	   public static void main(String[] args) {
	     try{
	       ServerSocket listener = new ServerSocket(port);
	       Socket server;

	       while(true){
	         server = listener.accept();
	         Server conn_c = new Server(server);
	         Thread t = new Thread(conn_c);
	         t.start();
	       }
	     } catch (IOException ioe) {
	       System.out.println("IOException on socket listen: " + ioe);
	       ioe.printStackTrace();
	     }
	   }
}